﻿using Auxiliary.VecMath;

namespace Simple3DRedactor.Domain
{
    public class MeshObject : Geometry
    {
        public MeshObject()
        {
            Name = "Mesh";
            Scale = new Vector3D(1.0f, 1.0f, 1.0f);
        }

        private Vector3D _scale;
        public Vector3D Scale
        {
            get { return _scale; }
            set
            {
                if (_scale != value)
                {
                    _scale = value;
                    OnChange();
                }
            }
        }

        private Mesh _mesh;
        public Mesh Mesh
        {
            get { return _mesh; }
            set
            {
                if (_mesh != value)
                {
                    _mesh = value;
                    OnChange();
                }
            }
        }

        public override TV CreateView<TV>(IObjectViewFactory<TV> factory)
        {
            return factory.Create(this);
        }
    }
}
